function prepare_graph_both(tt,yy,p_interest,ghat_MLE_tau25_unconstr,ghat_MLE_tau25_unconstr_noBerk,ghat_MLE_tau25_constr,ghat_MLE_tau25_constr_noBerk,ghat_MLE_tau50_unconstr,ghat_MLE_tau50_unconstr_noBerk,ghat_MLE_tau50_constr,ghat_MLE_tau50_constr_noBerk,ghat_MLE_tau75_unconstr,ghat_MLE_tau75_unconstr_noBerk,ghat_MLE_tau75_constr,ghat_MLE_tau75_constr_noBerk,data_directory, ref,pmin,pmax,qmin,qmax,tt_vec,y_interest,y_interest_univ)
			
	tau=tt_vec(tt);
	y_interest_sel=y_interest_univ(yy);
	sel=y_interest==y_interest_sel;
	
	tau_text=num2str(100*tau);
	yy_text=num2str(round(exp(y_interest_sel)));
	
	%==================================================================================================  
	figure;
	
	eval(['plot(p_interest(sel), ghat_MLE_tau' tau_text '_unconstr(sel),  ''rv-'',''MarkerSize'',4,''MarkerFaceColor'',''r'',''MarkerEdgeColor'',''r'');']);
	hold on;
	eval(['plot(p_interest(sel), ghat_MLE_tau' tau_text '_unconstr_noBerk(sel), ''bo-'',''MarkerSize'',4,''MarkerFaceColor'',''b'',''MarkerEdgeColor'',''b'');']);
	eval(['plot(p_interest(sel), ghat_MLE_tau' tau_text '_constr(sel),  ''rs-'',''MarkerSize'',4,''MarkerFaceColor'',''r'',''MarkerEdgeColor'',''r'');']);
	eval(['plot(p_interest(sel), ghat_MLE_tau' tau_text '_constr_noBerk(sel), ''bd-'',''MarkerSize'',4,''MarkerFaceColor'',''b'',''MarkerEdgeColor'',''b'');']);
	legend(strvcat('MLE, with Berkson', 'MLE, no Berkson','MLE (shape restricted), with Berkson', 'MLE (shape restricted), no Berkson'));
	grid on;
	xlabel('log price');
	ylabel('log demand');

	axis([pmin pmax qmin(tt,yy) qmax(tt,yy)]);
	
	name=[data_directory 'fig_tau' tau_text '_' ref '_yy' yy_text];
	savefig_fct(name,0);
	%-------------------------------------------------------------------------------------------------

	%==================================================================================================  
	figure;
	
	eval(['plot(p_interest(sel), ghat_MLE_tau' tau_text '_unconstr(sel),  ''kv-'',''MarkerSize'',4,''MarkerFaceColor'',''k'',''MarkerEdgeColor'',''k'',''LineWidth'',1.0);']);
	hold on;
	eval(['plot(p_interest(sel), ghat_MLE_tau' tau_text '_unconstr_noBerk(sel), ''ko-'',''MarkerSize'',4,''MarkerFaceColor'',''w'',''MarkerEdgeColor'',''k'',''LineWidth'',1.0);']);
	eval(['plot(p_interest(sel), ghat_MLE_tau' tau_text '_constr(sel),  ''ks-'',''MarkerSize'',4,''MarkerFaceColor'',''k'',''MarkerEdgeColor'',''k'',''LineWidth'',1.0);']);
	eval(['plot(p_interest(sel), ghat_MLE_tau' tau_text '_constr_noBerk(sel),''kd-'',''MarkerSize'',4,''MarkerFaceColor'',''w'',''MarkerEdgeColor'',''k'',''LineWidth'',1.0);']);
	legend(strvcat('MLE, with Berkson', 'MLE, no Berkson','MLE (shape restricted), with Berkson', 'MLE (shape restricted), no Berkson'));
	grid on;
	xlabel('log price');
	ylabel('log demand');

	axis([pmin pmax qmin(tt,yy) qmax(tt,yy)]);
	
	name=[data_directory 'fig_tau' tau_text '_' ref '_yy' yy_text '_BW'];
	savefig_fct(name,0);
	%-------------------------------------------------------------------------------------------------

